<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lang')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="langList" item="vo"}
                <label>
                    <input name="row[lang]" type="radio" value="{$vo.slug}" {if $vo.is_default==1 }checked{/if}/>
                    {$vo.title}
                </label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tags')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tags" class="form-control" data-role="tagsinput" name="row[tags]" type="text" value="{$row.tags|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_tw">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}【繁体】:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" name="row[lang_data][zh_tw][title]" type="text" value="{$row.lang_data.zh_tw.title|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=en">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}【英文】:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" name="row[lang_data][en][title]" type="text" value="{$row.lang_data.en.title|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_tw">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}【繁体】:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-lang_data-zh_tw-content" class="form-control editor" rows="5" name="row[lang_data][zh_tw][content]" cols="50">{$row.lang_data.zh_tw.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=en">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}【英文】:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-lang_data-en-content" class="form-control editor" rows="5" name="row[lang_data][en][content]" cols="50">{$row.lang_data.en.content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>

    <div class="form-group" data-favisible="lang=zh_tw">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}【繁体】:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-lang_data-zh_tw-image" class="form-control" size="50" name="row[lang_data][zh_tw][image]" type="text" value="{$row.lang_data.zh_tw.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-lang_data-zh_tw-image" class="btn btn-danger faupload" data-input-id="c-lang_data-zh_tw-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-lang_data-zh_tw-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-lang_data-zh_tw-image" class="btn btn-primary fachoose" data-input-id="c-lang_data-zh_tw-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-lang_data-zh_tw-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-lang_data-zh_tw-image"></ul>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=en">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}【英文】:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-lang_data-en-image" class="form-control" size="50" name="row[lang_data][en][image]" type="text" value="{$row.lang_data.en.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-lang_data-en-image" class="btn btn-danger faupload" data-input-id="c-lang_data-en-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-lang_data-en-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-lang_data-en-image" class="btn btn-primary fachoose" data-input-id="c-lang_data-en-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-lang_data-en-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-lang_data-en-image"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Multiplejson')}:</label>
        <div class="col-xs-12 col-sm-8">

            <table class="table fieldlist" data-name="row[multiplejson]" data-template="row[multiplejson]tpl">
                <tr>
                    <td>{:__('multiplejson title')}</td>
                    <td>{:__('multiplejson intro')}</td>
                    <td>{:__('multiplejson author')}</td>
                    <td>{:__('multiplejson age')}</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr><td colspan="5">
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
                    <textarea name="row[multiplejson]" class="form-control hide" cols="30" rows="5">{$row.multiplejson|htmlentities}</textarea>
                </td></tr>
            </table>
            <script type="text/html" id="row[multiplejson]tpl">
                <tr>
                    <td><input type="text" name="<%=name%>[<%=index%>][title]" class="form-control" value="<%=row.title%>"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][intro]" class="form-control" value="<%=row.intro%>"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][author]" class="form-control" value="<%=row.author%>"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][age]" class="form-control" value="<%=row.age%>"/></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>

        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-description" class="form-control" name="row[description]" type="text" value="{$row.description|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" min="0" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Switch')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <input  id="c-switch" name="row[switch]" type="hidden" value="{$row.switch}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-switch" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success {eq name="$row.switch" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group" data-favisible="lang=zh_cn">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
